package com.atguigu.observer;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description:
 * @create: 2022-03-08 13:05
 **/
public class Client {
    public static void main(String[] args) {
        //创建接入放 currentConditions
        CurrentConditions currentConditions = new CurrentConditions();

        //创建WeatherData 将接入方currentConditions 传递到weatherData
        WeatherData weatherData = new WeatherData(currentConditions);

        //更新天气情况
        weatherData.setData(30, 150, 40);

        System.out.println("-----------天气情况变化---------------");
        //天气情况变化
        weatherData.setData(40, 160, 20);


    }
}
